import launch_ros.actions
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration


def generate_launch_description():
    # 路径跟踪文件路径
    pathfilename = DeclareLaunchArgument(
        'pathfilename', default_value='/home/michael/bichon/src/software/bichon_path_follow/path/bichon_path_)

    save_path = launch_ros.actions.Node(
        package='bichon_path_follow',
        executable='save_path',
        name='save_path',
        output='screen',
        parameters=[{'pathfilename': LaunchConfiguration('pathfilename')},]
    )

    return LaunchDescription([
        pathfilename, save_path
    ])
